package com.a2v2.online.store.database.entity;

import java.util.HashSet;
import java.util.Set;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.JoinColumn;
import javax.persistence.OneToMany;
import javax.persistence.OneToOne;
import javax.persistence.Table;
import javax.persistence.Transient;

/**
 * @author aurionpro
 *
 */
@Entity
@Table(name = "customer_account")
public class CustomerAccount extends BaseEntity {

    /**
     */
    private static final long serialVersionUID = 3347683678500433936L;
    /**
     */
    @OneToOne(cascade = CascadeType.ALL, targetEntity = PersonalInfo.class)
    @JoinColumn(name = "personal_info_id")
    private PersonalInfo personalInfoId;
    /**
     */
//    @OneToMany(cascade = CascadeType.ALL)
//    @JoinColumn(name = "cust_acct_id")
    @Transient
    private Set<Address> aAddressSet = new HashSet<Address>();
    /**
     */
    @OneToOne(cascade = CascadeType.ALL)
    @JoinColumn(name = "address_id")
    private Address aAddressId;
    /**
     */
    @Column(name = "account_number")
    private Long acctNumber;

    /**
     */
    @Column(name = "type")
    private String type;

    /**
     */
    @Column(name = "status")
    private String status;

    /**
     */
    @Column(name = "locked")
    private boolean locked;
    
    /**
     * Gets the current value of acctNumber.
     * @return the acctNumber
     */
    public Long getAcctNumber() {
        return acctNumber;
    }

    /**
     * Sets the value of acctNumber.
     * @param pAcctNumber
     *            new value to be set.
     */
    public void setAcctNumber(final Long pAcctNumber) {
        this.acctNumber = pAcctNumber;
    }

    /**
     * Gets the current value of type.
     * @return the type
     */
    public String getType() {
        return type;
    }

    /**
     * Sets the value of type.
     * @param pType
     *            new value to be set.
     */
    public void setType(final String pType) {
        this.type = pType;
    }

    /**
     * Gets the current value of status.
     * @return the status
     */
    public String getStatus() {
        return status;
    }

    /**
     * Sets the value of status.
     * @param pStatus
     *            new value to be set.
     */
    public void setStatus(final String pStatus) {
        this.status = pStatus;
    }

    /**
     * Gets the current value of locked.
     * @return the locked
     */
    public boolean isLocked() {
        return locked;
    }

    /**
     * Sets the value of locked.
     * @param pLocked
     *            new value to be set.
     */
    public void setLocked(final boolean pLocked) {
        this.locked = pLocked;
    }
    
    /**
     * Gets the current value of id.
     * @return the id
     */
    public Long getId() {
        return id;
    }

    /**
     * Sets the value of id.
     * @param pId new value to be set.
     */
    public void setId(final Long pId) {
        this.id = pId;
    }

    /**
     * Gets the current value of addressSet.
     * @return the addressSet
     */
    public Set<Address> getAddressSet() {
        return aAddressSet;
    }

    /**
     * Sets the value of addressSet.
     * @param pAddressSet new value to be set.
     */
    public void setAddressSet(final Set<Address> pAddressSet) {
        this.aAddressSet = pAddressSet;
    }

    /**
     * Gets the current value of personalInfoId.
     * @return the personalInfoId
     */
    public PersonalInfo getPersonalInfoId() {
        return personalInfoId;
    }

    /**
     * Sets the value of personalInfoId.
     * @param pPrsonalInfoId new value to be set.
     */
    public void setPersonalInfoId(final PersonalInfo pPrsonalInfoId) {
        this.personalInfoId = pPrsonalInfoId;
    }


    /**
     * Sets the value of aAddressSet.
     * @param pAddressSet new value to be set.
     */
    public void setaAddressSet(final Set<Address> pAddressSet) {
        this.aAddressSet = pAddressSet;
    }

    /**
     * Gets the current value of aAddressId.
     * @return the aAddressId
     */
    public Address getAddressId() {
        return aAddressId;
    }

    /**
     * Sets the value of aAddressId.
     * @param pAddressId new value to be set.
     */
    public void setAddressId(final Address pAddressId) {
        this.aAddressId = pAddressId;
    }

}
